<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- <script>
        const arr = ["one","two"]
        arr.forEach(()=>{
            console.log(this);
        })
    </script> -->
    <script>
        /* for(var i=0;i<5;i++){
            setTimeout(function(){
                console.log(i+"");
            },100)
        } */
        console.log(1);
        let a = setTimeout(()=> {
            console.log(2);
        },0)
        console.log(3);
        Promise.resolve(4).then(b => {
            console.log(b);
            clearTimeout(a)
        })
        console.log(5);
    </script>
</body>
</html>